package com.xm.service.framework.feign;


import com.xm.service.framework.feign.fallback.UserFeignClientFallback;
import com.xm.service.framework.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "user-service",fallback = UserFeignClientFallback.class)
public interface UserFeignClient {

    @PostMapping(value = "/user/login")
    Result login(@RequestParam int uid, @RequestParam String pwd);

    @PostMapping(value = "/user/register")
    Result register(@RequestParam String uname,@RequestParam String password,
                    @RequestParam String email,@RequestParam int age,
                    @RequestParam String gender);

    @RequestMapping("/user/verifyCode")//验证码
    byte[] generateImage();

    @RequestMapping("/user/checkCode")
    int checkCode(@RequestParam String code);


}
